package com.feisuanyz.lyweb01.pojo.query;

import lombok.Data;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 新闻查询参数对象
 *
 * @author deng
 * @date 2025-02-26 11:57:37
 */
@Data
public class NewsQuery {

    /**
     * 资讯ID: 必填
     */
    @NotNull(groups = { QueryGroup.class }, message = "资讯ID不能为空")
    @Schema(description = "资讯ID: 必填")
    private Integer newsId;

    /**
     * 搜索关键词: 必填
     */
    @NotBlank(groups = { QueryGroup.class }, message = "搜索关键词不能为空")
    @Schema(description = "搜索关键词: 必填")
    private String keyword;

    /**
     * 分页页码: 必填
     */
    @NotNull(groups = { QueryGroup.class }, message = "分页页码不能为空")
    @Schema(description = "分页页码: 必填")
    private Integer pageIndex;

    /**
     * 分页每页数量: 必填
     */
    @NotNull(groups = { QueryGroup.class }, message = "分页每页数量不能为空")
    @Schema(description = "分页每页数量: 必填")
    private Integer pageSize;
}
